package com.numberma.loggingservice.Service.ServiceImpl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.numberma.loggingservice.Result.Result;
import com.numberma.loggingservice.Service.LoggingService;

import com.numberma.loggingservice.constant.LogConstant;
import com.numberma.loggingservice.entity.Log;
import com.numberma.loggingservice.mapper.LoggingMapper;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LogginServiceImpl extends ServiceImpl<LoggingMapper, Log> implements LoggingService {
    @Autowired
    private LoggingMapper loggingMapper;

    @Override
    public Result insert(Log log) {

          //异步推送
         loggingMapper.insert(log);
          return Result.ok(LogConstant.LOG_PUSH_SUCCESS);
    }
}
